package com.github.shuaidd.rest.runtime;

import org.activiti.app.model.common.ResultListDataRepresentation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("app")
public class ProcessDefinitionsResource extends AbstractProcessDefinitionsResource {

    @Override
    @RequestMapping(value = "/rest/process-definitions", method = RequestMethod.GET)
    public ResultListDataRepresentation getProcessDefinitions(
            @RequestParam(value = "latest", required = false) Boolean latest,
            @RequestParam(value = "deploymentKey", required = false) String deploymentKey) {
        return super.getProcessDefinitions(latest, deploymentKey);
    }
}
